package GUI.MarketingEmployee;

import javax.swing.JPanel;
import javax.swing.JLabel;
import javax.swing.JTextField;
import javax.swing.JButton;

import java.awt.Font;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;

public class AddCustomerPnl extends JPanel {
	public JTextField textFieldName;
	public JTextField textFieldRate;
	public static JButton btnAddCustomer;
	public JTextField textFieldBDate;
	public JTextField textFieldId;
	
	public AddCustomerPnl() {
		setLayout(null);
		
		JLabel lblNewLabel = new JLabel("Name:");
		lblNewLabel.setBounds(271, 113, 42, 21);
		add(lblNewLabel);
		
		textFieldName = new JTextField();
		textFieldName.setBounds(316, 113, 103, 21);
		add(textFieldName);
		textFieldName.setColumns(10);
		
		JLabel lblNewLabel_1 = new JLabel("Rate:");
		lblNewLabel_1.setBounds(271, 160, 34, 21);
		add(lblNewLabel_1);
		
		textFieldRate = new JTextField();
		textFieldRate.setBounds(316, 160, 103, 21);
		add(textFieldRate);
		textFieldRate.setColumns(10);
		
		btnAddCustomer = new JButton("Add Customer");
		/*btnAdd.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
			}
		});*/
		btnAddCustomer.setBounds(117, 230, 127, 23);
		add(btnAddCustomer);
		
		JLabel lblAddNewClient = new JLabel("Add New Client");
		lblAddNewClient.setFont(new Font("Tahoma", Font.BOLD, 13));
		lblAddNewClient.setBounds(134, 24, 121, 23);
		add(lblAddNewClient);
		
		JLabel lblBirthDate = new JLabel("Birth Date:");
		lblBirthDate.setBounds(31, 163, 62, 14);
		add(lblBirthDate);
		
		textFieldBDate = new JTextField();
		textFieldBDate.setColumns(10);
		textFieldBDate.setBounds(114, 160, 103, 21);
		add(textFieldBDate);
		
		JLabel lblId = new JLabel("Id:");
		lblId.setBounds(31, 113, 42, 21);
		add(lblId);
		
		textFieldId = new JTextField();
		textFieldId.setColumns(10);
		textFieldId.setBounds(117, 113, 103, 21);
		add(textFieldId);
		
			
		
	}
	public JTextField getTextFieldName() {
		return textFieldName;
	}
	public void setTextFieldName(JTextField textFieldName) {
		this.textFieldName = textFieldName;
	}
	public JTextField getTextFieldRate() {
		return textFieldRate;
	}
	public void setTextFieldRate(JTextField textFieldRate) {
		this.textFieldRate = textFieldRate;
	}
	public JTextField getTextFieldBDate() {
		return textFieldBDate;
	}
	public void setTextFieldBDate(JTextField textFieldBDate) {
		this.textFieldBDate = textFieldBDate;
	}
	
	
	public static void addController(ActionListener controller){
		System.out.print("Add new client->Add controller");
		btnAddCustomer.addActionListener(controller);
	}
}
